home *** CD-ROM | disk | FTP | other *** search
/ Windows News 1997 February / Windows News CD #1 - Fev 97.iso / share / srdsk207 / srdisk.doc < prev    next >
Encoding:
Text File  |  1997-01-22  |  38.4 KB  |  965 lines

  1.  
  2.                               SRDISK (TM)
  3.                     ReSizeable RAMDisk version 2.07
  4.                          for XMS and EMS memory
  5.  
  6.                  Copyright (c) 1991-1996 Marko Kohtala
  7.                           All rights reserved
  8.  
  9.  
  10.  
  11. CONTENTS
  12.  
  13.   1. Disclaimer of warranty
  14.   2. License
  15.   3. Features included
  16.   4. Files in this release
  17.   5. Usage
  18.   5.1. Basic installation
  19.   5.2. SRDISK device driver
  20.   5.2.1. XMS memory device driver
  21.   5.2.2. EMS memory device driver
  22.   5.2.3. EMS 3.2 memory device driver
  23.   5.3. SRDUMMY device driver
  24.   5.4. SRDISK program
  25.   5.4.1 SRDISK sample commands
  26.   5.4.2 SRDISK command line options
  27.   6. Troubleshooting
  28.   7. Frequently asked questions and answers
  29.   8. Trademarks
  30.   9. Last words
  31.  
  32.  
  33.  
  34.                        1. DISCLAIMER OF WARRANTY
  35.  
  36. THIS SOFTWARE AND MANUAL ARE PROVIDED "AS IS" AND WITHOUT WARRANTIES AS 
  37. TO PERFORMANCE OF MERCHANTABILITY OR ANY OTHER WARRANTIES WHETHER 
  38. EXPRESSED OR IMPLIED.  BECAUSE OF THE VARIOUS HARDWARE AND SOFTWARE 
  39. ENVIRONMENTS IN WHICH THIS PROGRAM MAY BE USED, NO WARRANTY OF FITNESS 
  40. FOR A PARTICULAR PURPOSE IS OFFERED.
  41.  
  42. GOOD DATA PROCESSING PROCEDURE DICTATES THAT ANY PROGRAM BE THOROUGHLY
  43. TESTED WITH NON-CRITICAL DATA BEFORE RELYING ON IT.  THE USER MUST
  44. ASSUME THE ENTIRE RISK OF USING THE PROGRAM.  ANY LIABILITY OF THE
  45. SELLER WILL BE LIMITED EXCLUSIVELY TO PRODUCT REPLACEMENT OR REFUND OF
  46. PURCHASE PRICE.
  47.  
  48.  
  49.  
  50.                                2. LICENSE
  51.  
  52. This software is NOT public domain. It is copyrighted software
  53. distributed as shareware.
  54.  
  55. This software is NOT free. A license fee must be paid if used longer 
  56. than for one month evaluation period. See PAYMENT.DOC for details of the 
  57. payment.
  58.  
  59. If you received this software on a CD-ROM or from a disk vendor, you 
  60. have only paid for the disk. You do NOT have a license to use this 
  61. software.
  62.  
  63. Everybody has the right to copy and distribute this software as long as
  64. it is unmodified and all the original files listed in chapter 4 of this 
  65. document are included. A fee of at most $7 may be charged for the total 
  66. expenses of copying. If a copying fee is taken, the receiver of this 
  67. software must be made aware that he has only the evaluation and copying 
  68. license stated above.
  69.  
  70. Remember that you may COPY THIS TO YOUR FRIENDS! This is the idea behind 
  71. shareware. Show this to your boss also (not meaning: if you do not count 
  72. him/her to your friends <g>). SRDISK can prove worth a few megabytes of 
  73. memory to you.
  74.  
  75.  
  76.  
  77.                           3. FEATURES INCLUDED
  78.  
  79. This RAM disk currently supports the following features:
  80.  
  81.   * Compatible with MS-DOS versions from 3 to 7 and DR-DOS 5 to 6.
  82.   * XMS - Extended memory on 286 and up with HIMEM or other XMS 2.0
  83.     driver.
  84.   * EMS - Expanded memory of LIM/EMS version 3.2 and 4.0.
  85.   * Device drivers may be chained to form larger disks using many
  86.     different kind memories.
  87.   * Resizeable - can preserve disk contents if new format has room 
  88.     enough.
  89.   * Removable. Can be disabled without reboot.
  90.   * Supports 32-bit sector addressing introduced in DOS 4. Thus over 32M
  91.     RAM disks are possible if you have the memory.
  92.   * Configurable
  93.       - sector size
  94.       - cluster size
  95.       - root directory entry count
  96.       - number of FATs
  97.   * Predefined DOS and FDFORMAT floppy disk look-alike formats.
  98.   * DISKCOPY compatible with DOS versions from 3.20 up. You can copy
  99.     to/from SRDISK drive using DOS DISKCOPY.
  100.   * Write protection.
  101.   * Can optionally set environment variables SRDISKn (n=1,2,...) to
  102.     the installed SRDISK drive letters.
  103.   * Comes with a dummy drive you can use to locate SRDISK (or any other 
  104.     installable) drive at a higher letter.
  105.  
  106. I have a list of new features to implement in the future. By sending 
  107. money and feature suggestions you can help me make this program still 
  108. better.
  109.  
  110. Users may find that the ability to resize is invaluable. Since some 
  111. programs can take best use of memory by directly using it while others 
  112. need a fast disk for temporary files, you can now have optimal 
  113. performance with both kinds of programs without the trouble of changing 
  114. configuration and rebooting.
  115.  
  116. The feature of being able to resize automagically when there is need for 
  117. it is currently not in my reach. FAT file system in DOS just was not 
  118. designed for it. There is some more explanation about it later in this 
  119. document.
  120.  
  121.  
  122.  
  123.                         4. FILES IN THIS RELEASE
  124.  
  125. The following files are distributed in this release:
  126.  
  127.         READ.ME         some notes
  128.         FILE_ID.DIZ     short description of packet for BBS operators
  129.         WHATSNEW.DOC    what is new in this release and history
  130.         SRDISK.DOC      this document
  131.         SRDXMS.SYS      device driver for XMS memory
  132.         SRDXMSS.SYS     device driver for XMS memory (small version)
  133.         SRDEMS.SYS      device driver for EMS 4.0 memory
  134.         SRDEMSS.SYS     device driver for EMS 4.0 memory (small version)
  135.         SRDEMS3.SYS     device driver for EMS 3.2 memory
  136.         SRDUMMY.SYS     device driver for nothing but use drive letters
  137.         SRDISK.EXE      formatter program
  138.         XMSSIZE.DOC     document for XMSSIZE.EXE
  139.         XMSSIZE.EXE     last resort tool for over 64M HIMEM.SYS trouble
  140.         SUOMI.DOC       Finnish version of this document
  141.         DEUTSCH.DOC     German note to German users
  142.         PAYMENT.DOC     registering information
  143.  
  144. The small versions of device drivers do not support DOS DISKCOPY 
  145. compatibility and may require user to make sure there is enough stack 
  146. available by specifying STACKS=8,512 (or similar) in CONFIG.SYS. Also, 
  147. you can not chain another device driver after a small version device 
  148. driver.
  149.  
  150.  
  151.  
  152.                                 5. USAGE
  153.  
  154. The SRDISK is basically split into two parts:
  155.  
  156.         1) a device driver to add the virtual drive into DOS and
  157.         2) a program to control the device driver
  158.  
  159. The following explains the installation and how to use both of these
  160. parts.
  161.  
  162.  
  163.                         5.1. BASIC INSTALLATION
  164.  
  165. The basic installation for XMS memory can be done following these steps:
  166.  
  167. 1. Copy SRDXMS.SYS into you root directory.
  168.  
  169. 2. Copy SRDISK.EXE into some directory in your PATH.
  170.  
  171. 3. Make sure you have HIMEM.SYS or some other XMS driver installed
  172.    in CONFIG.SYS before the following step.
  173.  
  174. 4. Add into your CONFIG.SYS line
  175.  
  176.         DEVICE=SRDXMS.SYS
  177.  
  178. 5. Add into your AUTOEXEC.BAT after the PATH command line
  179.  
  180.         SRDISK <size>
  181.  
  182. The <size> defines the disk size in Kbytes.
  183.  
  184. If you have EMS memory, then use file SRDEMS.SYS in place of SRDXMS.SYS 
  185. and make sure EMS 4.0 device driver is installed in CONFIG.SYS before 
  186. the SRDEMS.SYS.
  187.  
  188. The device driver adds into DOS a new disk drive. Before you run
  189. SRDISK.EXE or when you set the disk size to zero, the new disk drive
  190. behaves as if you have a floppy drive without a floppy inserted.
  191.  
  192.  
  193.                        5.2. SRDISK DEVICE DRIVER
  194.  
  195. For a RAM disk you need a device driver. This device driver supplies a 
  196. storage for an array of sectors which DOS uses to store all the data. 
  197. SRDISK comes with separate drivers for storing the sectors in XMS 
  198. (extended memory managed by HIMEM.SYS or other XMS driver) and in EMS 
  199. memory.
  200.  
  201. Most often you do not need any parameters for the device drivers, but 
  202. the driver accepts two parameters:
  203.  
  204.         DEVICE=SRDmmm.SYS [d:] [/A]
  205.  
  206. The [] around the parameter mean it is optional; you must not type the
  207. brackets.
  208.  
  209. d:      The 'd:' can be used to tell the driver at what letter it is 
  210.         assigned in case DOS does not let it know it.
  211.  
  212.         Another use for 'd:' is to define into what SRDISK drive the 
  213.         current driver is to be appended.
  214.  
  215.         If you need to have SRDISK at some specific drive letter, you 
  216.         can use SRDUMMY.SYS. Note though, that drive letters are always 
  217.         used in order from A to Z and you can only use up a few drives 
  218.         before the letter you want to use.
  219.  
  220. /A      This tells the driver to append itself to the previously 
  221.         installed SRDISK device driver. The memory accessed using this 
  222.         driver is then available as extra memory to the previously 
  223.         installed SRDISK drive.
  224.  
  225.         If you want the low part of your disk to use XMS and the high 
  226.         part EMS memory, you can put these two lines into your 
  227.         CONFIG.SYS
  228.  
  229.                 DEVICE=SRDXMS.SYS
  230.                 DEVICE=SRDEMS.SYS /A
  231.  
  232.         For this to work, the first device driver must have the extra 
  233.         code to look into the next driver for more memory. Therefore the 
  234.         first device driver must not be the small version SRDXMSS.SYS or 
  235.         SRDEMSS.SYS.
  236.  
  237. Merely installing the driver gives you no RAM disk. It is as if you had 
  238. installed a floppy drive without putting a disk in the drive. For that 
  239. you need the SRDISK.EXE program.
  240.  
  241. The following chapters give some explanation about the different memory 
  242. types and explains reasons for the problems there are.
  243.  
  244.  
  245.                     5.2.1. XMS MEMORY DEVICE DRIVER
  246.  
  247. 8088 processor instruction set can only access memory at addresses from 
  248. 0 to 1048575 (1 megabyte) and memory above the address 1048575 is called 
  249. extended memory. i80286 had a new mode (protected mode) where the 
  250. instructions had a little different meanings and could be used to 
  251. address memory above the 1 megabyte limit.
  252.  
  253. XMS (eXtended Memory Specification) is a means to control the usage of 
  254. extended memory between applications so that each application can have 
  255. exclusive access to some range of addresses without fear the other 
  256. application would be using the same memory for its own purposes.
  257.  
  258. When SRDISK (or any other XMS client) needs extended memory, it requests 
  259. it from extended memory manager (EMM) that follows the eXtended Memory 
  260. Specification. Most common and free such memory manager is HIMEM.SYS.
  261.  
  262. The EMM then tries to find available memory block (a contiguous range of 
  263. addresses available) that is as large or larger than the requested 
  264. memory block. If all of the available blocks are smaller than the 
  265. requested size, the request fails even if the available blocks would be 
  266. large enough when combined.
  267.  
  268. Since DOS and DOS programs still run in the 8088 mode where instructions 
  269. can not address memory beyond 1 megabyte limit, there is no way for them 
  270. to access the memory directly. XMS also defines service to copy memory 
  271. to and from the memory beyond the 1 megabyte limit.
  272.  
  273.  
  274.                     5.2.2. EMS MEMORY DEVICE DRIVER
  275.  
  276. Since 8088 could only address memory up to 1 megabyte, any memory added 
  277. had to be made to use the same addresses with already existing memory. 
  278. Some new hardware had to be added so that the memory occupying a range 
  279. of addresses could be switched with another block of memory. 
  280. Lotus/Intel/MicroSoft Expanded Memory Specification (LIM EMS) was 
  281. developed to provide standardized access to this memory for much the 
  282. same reason XMS was developed to provide access to extended memory.
  283.  
  284. EMS uses a 64K memory area divided into four separate 16K windows to 
  285. access the expanded memory. These windows show different 16K blocks of 
  286. EMS memory (called pages) as requested by the application.
  287.  
  288. EMS memory can also be simulated very efficiently with 386 virtual 
  289. memory. For example EMM386 uses this method to convert extended memory 
  290. into expanded memory.
  291.  
  292. Since EMS memory is consisted of separate 16K pages, there is no 
  293. requirement to have the allocated memory be in contiguous blocks as with 
  294. XMS memory. Since all the available memory can be allocated, you can 
  295. better predict how much memory you can allocate.
  296.  
  297.  
  298.                     5.2.3. EMS 3.2 MEMORY DEVICE DRIVER
  299.  
  300. EMS 3.2 is an older version of EMS. 4.0 is the currently most used one.
  301.  
  302. The main reason SRDISK has version 3.2 driver is that MS-Windows 3.1 has 
  303. a serious bug in the EMS protection it uses. Basically with the EMS 3.2 
  304. driver you can access EMS disk that has been allocated before starting 
  305. MS-Windows but not one that is allocated inside DOS window. With the EMS 
  306. 4.0 driver you can not access memory allocated before starting 
  307. MS-Windows but can well access memory that is allocated inside DOS 
  308. window.
  309.  
  310. In any case, MS-Windows will not allow any other process access the 
  311. disk allocated in another process.
  312.  
  313.  
  314.                        5.3. SRDUMMY DEVICE DRIVER
  315.  
  316. SRDUMMY.SYS can be used to force installable device drivers to some 
  317. specific drive letters. To better understand what for you might need it, 
  318. read the following paragraph.
  319.  
  320. DOS allocates drives in order from A to Z. The first drives A and B are 
  321. always used for floppy drives. If you have hard disks, drives from C up 
  322. are allocated to them by DOS before CONFIG.SYS is loaded. After all the 
  323. standard hardware drives have been assigned, DOS reads the CONFIG.SYS 
  324. and loads the devices found there. Each block device driver (a device 
  325. supplying only an array of blocks of data, like SRDISK) is assigned one 
  326. or more drive letters in the order they are in CONFIG.SYS. The device 
  327. drivers can not determine to which drives they get assigned.
  328.  
  329. SRDUMMY.SYS tells DOS it provides one or more block devices and thus 
  330. uses up some drive letters. There will not be any drives though, and if 
  331. you access the drives, you'll get the drive not ready error.
  332.  
  333. SRDUMMY.SYS takes one parameter: The drive letter the next block device 
  334. should be loaded to.
  335.  
  336. Take a look at the following sample CONFIG.SYS:
  337.  
  338.         DEVICE=SRDXMS.SYS
  339.         DEVICE=SRDUMMY.SYS G:
  340.         DEVICE=SRDEMS.SYS
  341.  
  342. If you have one hard disk, the floppies and hard disk use letters A-C. 
  343. SRDXMS.SYS is then loaded to D and SRDUMMY.SYS uses drives E and F.
  344. SRDEMS.SYS loads thus at G.
  345.  
  346. If you add a second hard drive, it will take drive letter D and 
  347. SRDXMS.SYS will then be at E and SRDUMMY.SYS use only drive F putting
  348. SRDEMS.SYS to G again.
  349.  
  350. If you add a few more drives so that drive G is already in use before 
  351. SRDUMMY.SYS gets loaded, you will only get a warning message from 
  352. SRDUMMY.SYS and the SRDEMS.SYS will load at the next available drive 
  353. letter.
  354.  
  355. DR-DOS 6 seems not to allow access to drive letters after P: even with 
  356. LASTDRIVE=Z statement in CONFIG.SYS. So with DR-DOS you must avoid using 
  357. the last drive letters after P:.
  358.  
  359.  
  360.                           5.4. SRDISK PROGRAM
  361.  
  362. The disk can be enabled by, for example, using command "SRDISK 1024"
  363. which will make first SRDISK a 1024K disk. It can be disabled by making
  364. it of size 0: "SRDISK 0".
  365.  
  366. You should include the command to enable the RAM disk into your
  367. AUTOEXEC.BAT file.
  368.  
  369. The SRDISK.EXE is self documented. You'll get the documentation by
  370. typing at the DOS prompt "SRDISK /?" and hitting enter. To get a hang of
  371. it better, some examples with explanations are given below.
  372.  
  373.  
  374.                      5.4.1. SRDISK SAMPLE COMMANDS
  375.  
  376. Command
  377.  
  378.         SRDISK 1024
  379.  
  380. creates or changes the old disk to a 1024K (= 1M) disk.
  381.  
  382. More precisely it calculates various disk parameters as it best sees fit
  383. for most users needs. Those disk parameters can be defined by user on
  384. the command line if the calculated values do not meet his needs. After
  385. the parameters have been calculated, the memory (1024K = 1M) needed for
  386. the disk is allocated and a disk image is created into the memory.
  387.  
  388. The calculated parameters include sector size, cluster size, number of
  389. FATs and root directory size.
  390.  
  391. - Sector is the basic unit of storage. It's size does not mean much, but
  392.   it has to be a power of 2 and no larger than 512 bytes.
  393.  
  394. - Cluster size tells in how large blocks the space is allocated. Larger
  395.   clusters mean smaller FAT (= File Allocation Table), but then even the
  396.   smallest file always takes at least that much space. Cluster can not
  397.   be smaller than one sector. A cluster is a collection of sectors.
  398.  
  399. - FAT is the table that holds information about each allocation unit,
  400.   cluster, on the disk. The information can be indication that the
  401.   cluster is free, or where the next cluster of the file is or that the
  402.   cluster is unusable. A disk only needs one FAT - though multiple
  403.   copies of it can be specified. Note that the other FATs are only
  404.   copies of the first one.
  405.  
  406. - Root directory is limited to hold only some predefined number of
  407.   files. If you get "Can not create file" errors while there is plenty
  408.   of free space on disk, you need to make the root directory larger.
  409.   Alternatively you should create a subdirectory and create the files
  410.   there. Subdirectories can be arbitrarily large.
  411.  
  412. If there is data on the disk to be preserved, sector and cluster size 
  413. are not changed.
  414.  
  415. Command
  416.  
  417.         SRDISK 1024 /O
  418.  
  419. does the same as the command 'SRDISK 1024' except the various disk
  420. parameters are not calculated but instead the old parameters are used.
  421.  
  422. Command
  423.  
  424.         SRDISK /F:1440
  425.  
  426. tries to create the disk to look like a real floppy disk. It also 
  427. defines some parameters that otherwise have no effect like media 
  428. descriptor, number of heads and sectors per track. These parameters have 
  429. no other function but to make it look like it is a real, physical disk - 
  430. which it is not. SRDISK drives are not accessible through BIOS, so some 
  431. diskcopy and utility programs can fail if used with SRDISK.
  432.  
  433. Command
  434.  
  435.         SRDISK /S:256 /C:1024 /D:64
  436.  
  437. reformats the disk. The size is determined by the old size of the disk
  438. even without the use of /O. Sector size is changed to 256 bytes, cluster
  439. size to 1024 bytes (two sectors) and root directory will hold 64 entries
  440. (one of which is used for the volume label).
  441.  
  442. Command
  443.  
  444.         SRDISK /U
  445.  
  446. clears the disk. It recalculates the format and makes it better if 
  447. possible, but preserves the disk size. Without this switch, the disk 
  448. contents are preserved if possible. This is also useful if you can not 
  449. resize the disk because of errors on it -- using this option the errors 
  450. will be ignored and the disk is made whole new.
  451.  
  452. Command
  453.  
  454.         SRDISK E:
  455.  
  456. tests if E is a SRDISK RAMDisk and, as no format is defined, display
  457. it's current configuration. The letter may not correspond to the letter
  458. known by DOS for the drive if the letter is defined wrong when
  459. installing the SRDISK.SYS device driver in CONFIG.SYS.
  460.  
  461. Command
  462.  
  463.         SRDISK
  464.  
  465. without the drive letter specified tries to determine the drive by first
  466. trying the current drive and if it is not a SRDISK drive, then the first
  467. SRDISK drive loaded in CONFIG.SYS. As no change in the format is
  468. defined, the current configuration of the found drive are displayed.
  469.  
  470.  
  471.                    5.4.2. SRDISK COMMAND LINE OPTIONS
  472.  
  473. To ease remembering the command line options, SRDISK has for some 
  474. settings several different options. Many of the options are long, but 
  475. you can truncate them if you write enough for SRDISK to identify the 
  476. option unambiguously.
  477.  
  478. An exact match in the full length of the option is always identified 
  479. instead of some another option that begins with the same characters.
  480.  
  481. All numeric parameters for the options are translated using the C 
  482. language rules: Number starting with 0 is octal number (base eight) and 
  483. with 0x is hexadecimal (base 16), others are decimal.
  484.  
  485. The options in alphabetical order are
  486.  
  487.   /?               List of most important command line options
  488.   /A:n             Number of FAT copies (1 or 2)
  489.   /ASK             Ask for confirmation if data would be lost
  490.   /AVAILABLE:n     Resize to disk to have n Kbytes of space available
  491.   /C:n             Cluster size
  492.   /CLUSTER:n       Same as /C
  493.   /D:n             Dir entries
  494.   /DEVICETYPE:n    Device type for DISKCOPY compatibility
  495.   /DIRENTRIES:n    Same as /D
  496.   /DOSFORMAT:n     DOS or FDFORMAT look-alike format
  497.   /E               Set environment variables SRDISKn
  498.   /ENVIRONMENT     Same as /E
  499.   /ERASE           Clear disk contents, implies /FORCE
  500.   /F:n             Same as /DOSFORMAT
  501.   /FATS:n          Same as /A
  502.   /FILESPACE:n     Make the disk have n Kbytes space for files
  503.   /FORCE           Destroy data if necessary to force new format
  504.   /FREEMEM:n       Determine disk size to leave at least n Kbytes mem free
  505.   /H               Same as /?
  506.   /HEADS:n         Number of heads for DISKCOPY compatibility
  507.   /HELP            Same as /?
  508.   /M:n[:n...]      Max sizes for different drivers chained to a drive
  509.   /MAXSIZE         Allocate the disk as large as it can safely be allocated
  510.   /MEDIA:n         Media ID byte for DISKCOPY compatibility
  511.   /MINSIZE         Alias to /AVAILABLE:0, minimize the disk
  512.   /NO              NO, do not destroy data to complete new format
  513.   /O               Use old disk format where not redefined
  514.   /OLD             Same as /O
  515.   /REGISTER        Display registration information
  516.   /REMOVABLE:x     Tell DOS the drive is removable if x is ON.
  517.   /S:n             Sector size (128, 256 or 512 bytes)
  518.   /SECTORS:n       Number of sectors per track
  519.   /SECTORSIZE:n    Same as /S
  520.   /SIDES:n         Same as /HEADS
  521.   /SPT:n           Same as /SECTORS
  522.   /U               Same as /ERASE, FORMAT compatible
  523.   /UNCONDITIONAL   Same as /ERASE /FORCE
  524.   /V:n             Verbose level (1-5) to control amount of output
  525.   /VERBOSE:n       Same as /V
  526.   /W:x             Write protection x is ON/+ or OFF/-
  527.   /WRITEPROTECT:x  Same as /W
  528.   /Y               Same as /FORCE
  529.   /YES             Same as /FORCE
  530.  
  531. The options by function
  532.  
  533.   /? /H /HELP
  534.  
  535.         List the most important command line options and exit.
  536.  
  537.   /A:n /FATS:n
  538.  
  539.         Number of FAT copies (1 or 2). You need only one FAT unless you 
  540.         need to make the disk look like some floppy disk.
  541.  
  542.   /AVAILABLE:n /MINSIZE
  543.  
  544.         Space available on the disk. The disk size will be counted to be 
  545.         large enough to hold the files already on it and to have n 
  546.         Kbytes of space available.
  547.  
  548.         /MINSIZE is the same as /AVAILABLE:0 and will also make the root 
  549.         directory smaller.
  550.  
  551.   /C:n /CLUSTER:n
  552.  
  553.         Cluster size. Cluster is the unit used to allocate disk space.
  554.         This option has effect on the space used for File Allocation 
  555.         Table. If cluster size is small, bigger FAT is needed and there 
  556.         is less room for files, but files may take more room.
  557.  
  558.   /D:n /DIRENTRIES:n
  559.  
  560.         Root directory entries. FAT file system has fixed size root 
  561.         directory. You can specify the size for it using this option.
  562.  
  563.         Note that each entry is 32 bytes long and a fixed amount of 
  564.         sectors are used to hold the entries. Thus if sector size is 512 
  565.         bytes each sector can hold 16 entries (512 / 32 = 16) and 
  566.         specifying /D:4 or /D:16 uses exactly the same amount of space 
  567.         on the disk: one sector.
  568.  
  569.         If there is nothing against it, I start to round the number of 
  570.         root directory entries up to fill the last root directory 
  571.         sector. Some utility programs can be confused if the last sector 
  572.         is only partially used.
  573.  
  574.   /DEVICETYPE:n
  575.  
  576.         DOS does not care what type the device is, but in case some 
  577.         utility program asks DOS for the type it can be specified with 
  578.         this switch. This is normally set correctly if you use the /F 
  579.         switch. Device types are
  580.  
  581.                 0 = 360K
  582.                 1 = 1.2M
  583.                 2 = 720K
  584.                 3 = 8-inch single-density
  585.                 4 = 8-inch double-density
  586.                 5 = Hard disk
  587.                 6 = Tape drive
  588.                 7 = 1.44M
  589.                 8 = Read/Write optical
  590.                 9 = 2.88M
  591.  
  592.   /E /ENVIRONMENT
  593.  
  594.         Set environment variables SRDISK1, SRDISK2 etc. to the drive 
  595.         letters or SRDISK drives installed. You can then use the 
  596.         variables in batch files to access the RAM disk.
  597.  
  598.         For example:
  599.  
  600.                 REM Set environment variables without much output and
  601.                 REM make a tiny disk at the same time
  602.                 SRDISK /E /V:1 /F:1
  603.                 SET TMP=%SRDISK1%:\TMP
  604.                 MKDIR %TMP%
  605.  
  606.                 IF "%SRDISK2%" == "" ECHO You have only one SRDISK drive
  607.  
  608.   /F:n /DOSFORMAT:n
  609.  
  610.         DOS or FDFORMAT look-alike formats. The number n defines the disk 
  611.         size in Kbytes. This option also sets all the other parameters 
  612.         besides the size to match the corresponding DOS or FDFORMAT 
  613.         created floppy disk.
  614.  
  615.         The currently supported formats are
  616.  
  617.           Size Media Device SPT Head Root
  618.  
  619.            160  FE     360   8   1    64    DOS
  620.            180  FC     360   9   1    64    DOS
  621.            200  FD     360  10   1   112    FDFORMAT
  622.            205  FD     360  10   1   112    FDFORMAT
  623.            320  FF     360   8   2   112    DOS
  624.            360  FD     360   9   2   112    DOS
  625.            400  FD     360  10   2   112    FDFORMAT
  626.            410  FD     360  10   2   112    FDFORMAT
  627.            640  FB     720   8   2   112    DOS
  628.            720  F9     720   9   2   112    DOS
  629.            800  F9     720  10   2   112    FDFORMAT
  630.            820  F9     720  10   2   112    FDFORMAT
  631.           1200  F9     1.2  15   2   224    DOS
  632.           1440  F0    1.44  18   2   224    DOS
  633.           1476  F0    1.44  18   2   224    FDFORMAT
  634.           1600  F0    1.44  20   2   224    FDFORMAT
  635.           1640  F0    1.44  20   2   224    FDFORMAT
  636.           1680  F0    1.44  21   2   224    FDFORMAT
  637.           1722  F0    1.44  21   2   224    FDFORMAT
  638.           2880  F0    2.88  24   2   240    DOS
  639.  
  640.         In addition to these there is a special format 1 to make a mini 
  641.         disk. This can be used if you have your RAM disk in your PATH 
  642.         and do not want to get Drive Not Ready errors when you have 
  643.         freed the memory for RAM disk. Check your memory manager though: 
  644.         some memory managers allocate memory in 16K chunks and a 1K disk 
  645.         uses as much memory as a 16K disk does.
  646.  
  647.   /FILESPACE:n
  648.  
  649.         Space available for files. The disk will be larger than n 
  650.         Kbytes, since file allocation table and root directory always 
  651.         take some space too.
  652.  
  653.         Note that files usually take some extra space because the space 
  654.         for them is allocated in clusters. For example, if cluster size 
  655.         is 1024 bytes (1K), any file this long or smaller (but not 0 
  656.         bytes) will use one cluster and thus 1024 bytes.
  657.  
  658.         Subdirectories also use file space.
  659.  
  660.   /FREEMEM:n /MAXSIZE
  661.  
  662.         Memory available for other programs. The disk will be sized to 
  663.         leave at least n Kbytes of memory to other programs. The disk 
  664.         size may be less than necessary if there is some uncertainty 
  665.         whether or not all the memory can be allocated.
  666.  
  667.         FOR XMS MEMORY, THIS CAN ALLOCATE LESS THAN THERE IS AVAILABLE 
  668.         SINCE XMS CAN NOT RELIABLY PUT ALL FREE MEMORY IN ONE BLOCK. 
  669.         ALSO, SINCE SOME MEMORY MANAGERS ALLOCATE MEMORY IN BLOCKS OF 4 
  670.         OR 16 KBYTES, THERE MIGHT BE 15 KBYTES LESS FREE MEMORY THAN 
  671.         REQUESTED.
  672.  
  673.         The disk can also be disabled if more free memory is requested 
  674.         than there is available.
  675.  
  676.         /MAXSIZE is same as /FREEMEM:0, thus using all safely available 
  677.         memory for the disk.
  678.  
  679.         If some program of yours needs free memory and you do not care 
  680.         for disk contents, you can put for example
  681.  
  682.                 SRDISK /FREEMEM:1024 /YES
  683.  
  684.         into a batch file to start to program. The /YES gives permission 
  685.         to clear the disk if the disk can not be made small enough 
  686.         otherwise.
  687.  
  688.   /HEADS:n /SIDES:n
  689.  
  690.         Number of heads for DISKCOPY compatibility. This is normally set 
  691.         correctly if you use the /F switch.
  692.  
  693.   /M:n[:n...]
  694.  
  695.         Max sizes for different drivers chained to a drive.
  696.  
  697.         Normally SRDISK uses as much space as is available on the first 
  698.         driver and only then starts allocating on the second one. If you 
  699.         want to use only up to some amount of memory on the different 
  700.         drivers chained to one drive, you can define the amounts with 
  701.         this option.
  702.  
  703.         For example to define first driver use only 100K of memory, give 
  704.         command
  705.  
  706.                 SRDISK /M:100
  707.  
  708.         If you would have three or more drivers chained into one drive, 
  709.         you could define first and third to use 100K and let the other 
  710.         drivers use as much as they were allowed to use before with 
  711.         command
  712.  
  713.                 SRDISK /M:100::100
  714.  
  715.   /MEDIA:n
  716.  
  717.         Media ID byte for DISKCOPY compatibility. This is normally set 
  718.         correctly if you use the /F switch.
  719.  
  720.         Use Media IDs in the range from 0xF0 to 0xFF. Smaller values 
  721.         make CHKDSK report that it is possibly non-DOS format media.
  722.  
  723.   /O /OLD
  724.  
  725.         Use old disk format where not explicitly redefined with command
  726.         line options.
  727.  
  728.   /REGISTER
  729.  
  730.         Displays the registration information.
  731.  
  732.   /REMOVABLE:x
  733.  
  734.         This is for advanced users only. If you do not know all the 
  735.         possible effects of this switch, you better leave it alone.
  736.  
  737.         This is provided to allow fooling programs which misbehave when 
  738.         they see a removable RAM disk. If the x is ON, + or nothing, the 
  739.         device driver reports the disk correctly as removable. If the x 
  740.         is OFF or -, the device driver reports the disk not removable in 
  741.         the same way RAMDRIVE does. It also prohibits SRDISK.EXE from 
  742.         reformatting the disk.
  743.  
  744.   /S:n /SECTORSIZE:n
  745.  
  746.         Sector size (128, 256 or 512 bytes). Sector is the basic 
  747.         allocation unit of a disk. Smaller sector size can decrease the 
  748.         amount of memory wasted on boot sector, FAT and root directory, 
  749.         but that is just about the only benefit of it. Clusters are 
  750.         formed of sectors, so sector size can not be larger than cluster 
  751.         size. DOS uses by default 512 bytes per sectors.
  752.  
  753.   /SECTORS:n /SPT:n
  754.  
  755.         Number of sectors per track for DISKCOPY compatibility. This is 
  756.         normally set correctly if you use the /F switch.
  757.  
  758.   /U /UNCONDITIONAL /ERASE
  759.  
  760.         Clear disk contents. This implies option /YES.
  761.  
  762.         If your disk gets corrupted and SRDISK refuses to reformat it, 
  763.         try this switch. SRDISK should not then care about the current 
  764.         disk, but rather just wipes it off and creates a new one.
  765.  
  766.   /V:n /VERBOSE:n
  767.  
  768.         Verbose level (1-5) to control amount of output. With /V:1 you 
  769.         can limit the output to the title.
  770.  
  771.   /W:x /WRITEPROTECT:x
  772.  
  773.         Write protection control. The parameter x can be ON, + or nothing 
  774.         to enable the write protection or OFF or - to disable it.
  775.  
  776.   /Y /YES /FORCE
  777.   /NO
  778.   /ASK
  779.  
  780.         These are to control the need of user intervention.
  781.  
  782.         All questions in SRDISK are formed so that answer YES will give 
  783.         permission to destroy data and continue, while NO will abort the 
  784.         operation and try to preserve the data on the disk. By these 
  785.         options you can give the answer on the command line.
  786.  
  787.         /ASK is the default and means the user will be prompted to make 
  788.         choice.
  789.  
  790.  
  791.  
  792.                            6. TROUBLESHOOTING
  793.  
  794. Causes of grief
  795.  
  796. 1. RAM disks loose their contents when power is turned off! Do not store
  797. anything valuable there.
  798.  
  799. 2. There is no XMS nor EMS memory without a proper device driver. 
  800. HIMEM.SYS will do for XMS. For EMS you need to install the device driver 
  801. that came with your expanded memory hardware. QEMM can supply both on 
  802. 386 or better hardware and you might be better off using the SRDEMS 
  803. driver with it.
  804.  
  805. 3. Not all HIMEM.SYS support memory above 16M limit. HIMEM.SYS versions 
  806. 2.78 and later should be good. Also these later versions may be limited
  807. to 128000K blocks; solution is to link two (or more) SRDXMS.SYS drivers
  808. (i.e. add "DEVICE=SRDXMS.SYS /A" line to CONFIG.SYS) and limit the first
  809. one with command "SRDISK /M:128000". This will only break the /MAXSIZE
  810. option.
  811.  
  812. 4. Not all HIMEM.SYS support memory above 64M limit. You can try
  813. XMSSIZE.EXE as a last resort solution after trying to find a working XMS
  814. driver.
  815.  
  816. 5. DR-DOS 5 HIDOS.SYS does not implement the XMS resize function.
  817. Therefore SRDISK may not be able to resize the disk unless you replace 
  818. the HIDOS.SYS with HIMEM.SYS.
  819.  
  820. 6. Some programs swap themselves for a shell to the RAMDisk. If you
  821. change the format of the disk or clear the disk from such program, the
  822. swapped program may not be able to recover and can crash your computer.
  823.  
  824. 7. Some disk caching programs are reported to cache SRDISK too! This can
  825. cause a system crash and caching a RAM disk is anyway useless. If you 
  826. use a disk cache, please load it before SRDxxx.SYS or tell it explicitly 
  827. not to cache the SRDISK drive.
  828.  
  829. 8. SRDISK needs it's XMS memory in one contiguous area. Therefore if
  830. SRDISK complaints about insufficient memory while you have plenty of it 
  831. free, the reason might be that some other program uses a piece of the
  832. memory in the middle of the available memory. If you have a choice, use 
  833. EMS since it does not (usually) have this problem.
  834.  
  835. 9. There can be problems with XMS memory when not enough of it can be
  836. allocated. This may result in lost disk contents. Also some memory 
  837. managers that provide both XMS and EMS (like QEMM and the EMM386.EXE of 
  838. MS-DOS 6) can fool SRDISK to think there is more memory available than 
  839. there really is if SRDISK uses both XMS and EMS memory for the disk.
  840.  
  841. 10. Some multitasking environments (like MS-Windows) can free the memory
  842. allocated under them to the RAM disk. This will cause the data to be lost
  843. and errors in programs that try to access the disk.
  844.  
  845. 11. MS-Windows has buggy memory protection that prevents programs from
  846. accessing memory allocated in another session. It also prevents using 
  847. EMS memory allocated for the SRDEMS.SYS driver outside Windows and for 
  848. the SRDEMS3.SYS driver inside Windows. In general you may find it better 
  849. to use SRDEMS3.SYS or SRDXMS.SYS and allocate any disk you will use 
  850. before starting Windows and never resize any disk while inside Windows.
  851.  
  852.  
  853.  
  854.                 7. FREQUENTLY ASKED QUESTIONS AND ANSWERS
  855.  
  856. Q: Why can not SRDISK resize automatically as files are written to the
  857.    disk? Or why can not SRDISK allocate memory only as much as needed for
  858.    the files?
  859. A: SRDISK device driver is very stupid. It only reads and writes sectors,
  860.    that is, blocks of data, as requested by DOS. The device driver does
  861.    not know anything about files and directories. SRDISK with this
  862.    functionality would not be SRDISK anymore. It would be much larger,
  863.    somewhat slower and less reliable in some circumstances.
  864.  
  865. Q: Can you write a program that saves the disk contents on shutdown or
  866.    periodically and restores it on startup?
  867. A: Yes, but I find it unnecessary. I think disk caches can come close to
  868.    what you are after. Also, there already is such a program, called
  869.    ramsave, which works with all RAM disks. I only know how to find it
  870.    on Internet: go to http://www.shareware.com/ and search for it. It
  871.    propably is on SimTel with SRDISK, see below for instructions to get
  872.    SRDISK.
  873.  
  874. Q: I have a CD-ROM/NET at drive D:, but now SRDISK wants to use D:. What
  875.    now?
  876. A: SRDISK is a block device driver and DOS, not SRDISK, selects the
  877.    drive letter for the drive. CD-ROM is a file system and DOS allows it
  878.    to choose it's own drive letter. You'd have this same problem with
  879.    second hard disk or other block device. In my opinion, it is best to
  880.    install CD-ROM at drive letter Z: so you do not run into this problem
  881.    again. If you are fearless explorer, you can seek for some device
  882.    driver loader. They go into DOS internals to set the drive letter
  883.    while they install the device driver. They also tend to be unreliable
  884.    and work with only few DOS versions.
  885.  
  886. Q: Why does Windows 95 slow down when I have SRDISK installed?
  887. A: It does not recognize SRDISK and uses safer and slower disk access
  888.    methods. I have reports that you can rename SRD?MS.SYS to RAMDRIVE.SYS
  889.    to speed Windows 95.
  890.  
  891. Q: What is the latest version of SRDISK?
  892. A: SRDISK has become quite stable. There are no new versions very often.
  893.    However, check the answer to the next question below or email me.
  894.    I'll be glad to tell you. My address is at the end of this document.
  895.  
  896. Q: Where can I find latest version of SRDISK?
  897. A: I always send it first to SimTel. SimTel is a large and well
  898.    maintained collection of freely distributable software and there are
  899.    many places on Internet which keep up to date copies of it. The main
  900.    site is in ftp://ftp.coast.net/SimTel/msdos/ramdisk/. SimTel
  901.    collection is also available on CD-ROM.
  902.  
  903. Q: Is your address still PL 115, FIN-01451 Vantaa?
  904. A: Yes. You are right to ask this if you have SRDISK version well over
  905.    year old. I am finishing my studies and changes in my life are ahead.
  906.  
  907. Q: SRDISK does not work! What is the problem?
  908. A: Give me more information. I need to know exactly what you have done
  909.    and what results you get. Tell me your DOS manufacturer (MS, IBM,
  910.    DR...), DOS version, hardware description with CPU type, amount of
  911.    memory, memory manager software versions. Include CONFIG.SYS,
  912.    AUTOEXEC.BAT, detailed chronological description of what you see on
  913.    screen, what you type etc. The best is if I can get the problem
  914.    appear on my PC.
  915.  
  916. Q:
  917. A: I am kind of pleased this silence is so common. However, I live on
  918.    feedback. Feed me. Do not keep silent.
  919.  
  920.  
  921.  
  922.                              8. TRADEMARKS
  923.  
  924. Oh, and we should not forget these (I can not verify they are correct, 
  925. but still):
  926.  
  927. QEMM is a trademark of Quartedreck Office Systems Inc.
  928. Microsoft, MS-DOS, SmartDrive and Windows are trademarks of Microsoft 
  929. Corporation. DR-DOS is a trademark of Novell. Intel is a trademark of 
  930. Intel Corporation. Lotus is trademark of Lotus Development Corporation.
  931.  
  932. FDFORMAT is copyrighted by (and trademark of?) Christoph H. Hochstätter,
  933. Germany. Nice work.
  934.  
  935. SRDISK is my trademark.
  936.  
  937. If any mentioned trademarks are not included in this list, please tell 
  938. me about them. They are anyway hereby acknowledged.
  939.  
  940.  
  941.  
  942.                              9. LAST WORDS
  943.  
  944. Please, if you know of a way to get around the Windows 3.1 memory 
  945. protection, let me know about it.
  946.  
  947. You can contact me by sending email from
  948.  
  949.         Internet to `Marko.Kohtala@compart.fi'
  950.         CompuServe to `>INTERNET:Marko.Kohtala@compart.fi'
  951.  
  952. If the above address fails (if you do not get a reply, it probably has 
  953. failed), I can still be reached at `Marko.Kohtala@ntc.nokia.com'.
  954.  
  955. If you have access to Fidonet, Bitnet, UUCP mail, MS-Mail or just about
  956. any email, ask your system operator if you can mail to Internet.
  957.  
  958. My surface mail address is
  959.  
  960.         Marko Kohtala
  961.         PL 115
  962.         FIN-01451 Vantaa
  963.         FINLAND
  964.  
  965.